using System;
using System.Text;

namespace OVS.BusinessObjects
{
	[Serializable()]
	public partial class User
	{
		private int _user_id;

		public int user_id
		{
			get { return _user_id; }
			set { _user_id = value; }
		}

		private string _user_name;

		public string user_name
		{
			get { return _user_name; }
			set { _user_name = value; }
		}

		private string _user_tel;

		public string user_tel
		{
			get { return _user_tel; }
			set { _user_tel = value; }
		}

		private string _user_mail;

		public string user_mail
		{
			get { return _user_mail; }
			set { _user_mail = value; }
		}

		private Nullable<int> _user_role;

		public Nullable<int> user_role
		{
			get { return _user_role; }
			set { _user_role = value; }
		}

		private Nullable<int> _user_lvl_notif;

		public Nullable<int> user_lvl_notif
		{
			get { return _user_lvl_notif; }
			set { _user_lvl_notif = value; }
		}

		private string _user_pwd;

		public string user_pwd
		{
			get { return _user_pwd; }
			set { _user_pwd = value; }
		}

		private string _user_login;

		public string user_login
		{
			get { return _user_login; }
			set { _user_login = value; }
		}

		public User()
		{ }

		public User(int user_id,string user_name,string user_tel,string user_mail,Nullable<int> user_role,Nullable<int> user_lvl_notif,string user_pwd,string user_login)
		{
			this.user_id = user_id;
			this.user_name = user_name;
			this.user_tel = user_tel;
			this.user_mail = user_mail;
			this.user_role = user_role;
			this.user_lvl_notif = user_lvl_notif;
			this.user_pwd = user_pwd;
			this.user_login = user_login;
		}

		public override string ToString()
		{
			return "user_id = " + user_id.ToString() + ",user_name = " + user_name + ",user_tel = " + user_tel + ",user_mail = " + user_mail + ",user_role = " + user_role.ToString() + ",user_lvl_notif = " + user_lvl_notif.ToString() + ",user_pwd = " + user_pwd + ",user_login = " + user_login;
		}

		public partial class user_idComparer : System.Collections.Generic.IComparer<User>
		{
			public SorterMode SorterMode;
			public user_idComparer()
			{ }
			public user_idComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<User> Membres
			int System.Collections.Generic.IComparer<User>.Compare(User x, User y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.user_id.CompareTo(x.user_id);
				}
				else
				{
					return x.user_id.CompareTo(y.user_id);
				}
			}
			#endregion
		}
		public partial class user_nameComparer : System.Collections.Generic.IComparer<User>
		{
			public SorterMode SorterMode;
			public user_nameComparer()
			{ }
			public user_nameComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<User> Membres
			int System.Collections.Generic.IComparer<User>.Compare(User x, User y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.user_name.CompareTo(x.user_name);
				}
				else
				{
					return x.user_name.CompareTo(y.user_name);
				}
			}
			#endregion
		}
		public partial class user_telComparer : System.Collections.Generic.IComparer<User>
		{
			public SorterMode SorterMode;
			public user_telComparer()
			{ }
			public user_telComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<User> Membres
			int System.Collections.Generic.IComparer<User>.Compare(User x, User y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.user_tel.CompareTo(x.user_tel);
				}
				else
				{
					return x.user_tel.CompareTo(y.user_tel);
				}
			}
			#endregion
		}
		public partial class user_mailComparer : System.Collections.Generic.IComparer<User>
		{
			public SorterMode SorterMode;
			public user_mailComparer()
			{ }
			public user_mailComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<User> Membres
			int System.Collections.Generic.IComparer<User>.Compare(User x, User y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.user_mail.CompareTo(x.user_mail);
				}
				else
				{
					return x.user_mail.CompareTo(y.user_mail);
				}
			}
			#endregion
		}
		public partial class user_pwdComparer : System.Collections.Generic.IComparer<User>
		{
			public SorterMode SorterMode;
			public user_pwdComparer()
			{ }
			public user_pwdComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<User> Membres
			int System.Collections.Generic.IComparer<User>.Compare(User x, User y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.user_pwd.CompareTo(x.user_pwd);
				}
				else
				{
					return x.user_pwd.CompareTo(y.user_pwd);
				}
			}
			#endregion
		}
		public partial class user_loginComparer : System.Collections.Generic.IComparer<User>
		{
			public SorterMode SorterMode;
			public user_loginComparer()
			{ }
			public user_loginComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<User> Membres
			int System.Collections.Generic.IComparer<User>.Compare(User x, User y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.user_login.CompareTo(x.user_login);
				}
				else
				{
					return x.user_login.CompareTo(y.user_login);
				}
			}
			#endregion
		}
	}
}
